<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      width: 500px;
      height: 500px;
      background-color: orange;

      display: flex;
    }

    .item {
      width: 120px;
      /* 基础尺寸 */
      flex-basis: 120px; /*完整显示，不分行，item会变宽*/
      /* 设置flex items在main axis方向上的base size 
            flex-basis: 120px;口auto(默认值)、具体的宽度数值(100px)
          
          决定flex items最终base size的因素，从优先级高到低
              口max-width\max-height\min-width\min-height
              口flex-basis
              口width\height
              口内容本身的size
      */
      height: 120px;
    }
  </style>
</head>
<body>
  
  <div class="container">
    <div class="item item1">1</div>
    <div class="item item2">2我是coderwhy_why_hahahaha</div>
    <div class="item item3">3</div>
  </div>

  <script src="./js/itemRandomColor.js"></script>
</body>
</html>